package wj.tree;

import wj.WJValue;

public class StringEqualityNode implements WJNode{
	
	private WJNode stringNode1;
	private WJNode stringNode2;
	
	public StringEqualityNode(WJNode stringNode1, WJNode stringNode2){
		this.stringNode1 = stringNode1;
		this.stringNode2 = stringNode2;
	}

	@Override
	public WJValue evaluate() {
		String string1 = stringNode1.evaluate().toString();
		String string2 = stringNode2.evaluate().toString();
		return new WJValue(string1.equals(string2));
	}
	
}
